/**
 * modelprecedenceconstraint.h is part of cbs-framework.
 *
 * cbs-framework is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * cbs-framework is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with cbs-framework.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef MODELPRECEDENCECONSTRAINT_H
#define MODELPRECEDENCECONSTRAINT_H

#include "modelconstraint.h"
#include "../definitions.h"

class ModelPrecedenceConstraint : public ModelConstraint
{
public:
    ModelPrecedenceConstraint( const std::string & a_taskBefore, const std::string & a_taskAfter );

    virtual ~ModelPrecedenceConstraint() {}

    virtual void Accept( Visitor * a_visitor );

    virtual std::string Print() const;

    const std::string & TaskBefore() const;

    const std::string & TaskAfter() const;

private:

    // Fields
    // ------

    std::string m_taskBefore;
    std::string m_taskAfter;

    static const std::string PRECEDENCE_STR;
    static const std::string TASK_STR;
    static const std::string BEFORE_STR;

    // Methods
    // -------

    // Protect default constructor.
    ModelPrecedenceConstraint();

    // Protect default copy constructor.
    ModelPrecedenceConstraint( const ModelPrecedenceConstraint & a_other );

    // Protect default operator =.
    ModelPrecedenceConstraint & operator = ( const ModelPrecedenceConstraint & a_other );
};

#endif // MODELPRECEDENCECONSTRAINT_H
